package insight.miescor.db;

import insight.miescor.opp.domain.AssignmentGrid;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class AssignmentMapper implements RowMapper {
	public AssignmentGrid mapRow(ResultSet res, int arg1) throws SQLException {
		
		AssignmentGrid beanObj = new AssignmentGrid();
		beanObj.setId(res.getInt("id"));
		beanObj.setOpportunityId(res.getString("opportunityId"));
		beanObj.setStartDate(res.getDate("startDate"));
		beanObj.setEndDate(res.getDate("endDate"));
		beanObj.setStatus(res.getString("Status"));
		beanObj.setStepId(res.getInt("stepId"));
		beanObj.setRole(res.getString("role"));
		beanObj.setUserId(res.getString("userId"));
		beanObj.setTitle(res.getString("title"));
		beanObj.setProjectType(res.getString("projecttype"));
		beanObj.setProjectObjId(res.getInt("ProjectObjId"));
		beanObj.setInitiator(res.getString("Initiator"));
		beanObj.setCreatedOn(res.getDate("CreatedOn"));
		
		return beanObj;
	}
}
